// 竞赛分类 api
import { get, httpRequest, post } from '@/http/request'
import { params } from '@/types/common'
/**
 * 增加竞赛
 */
export const addCategoryService = (data) => {
  return httpRequest({
    url: 'competition/category/add',
    method: 'post',
    data,
  })
}
/**
 * 获取所有的竞赛分类
 */
export const fetchAllCategory = (data: params) => {
  return post('competition/category/all', data)
}
/**
 * 修改竞赛分类信息
 */
export const updateCategoryService = (data) => {
  return httpRequest({
    url: 'competition/category/update',
    method: 'post',
    data,
  })
}
